<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Public.Master" 
    Inherits="System.Web.Mvc.ViewPage<IEnumerable<Owlpal.Models.Newsletter>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	List of Newsletters
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <h2>List of Newsletters</h2>
    <table>
        <tr>
            <th>
                Date
            </th>
            <th>
                Subject
            </th>
        </tr>
        <% foreach (var newsletter in Model)
       { %>
        <tr>
            <td>
                <%= Html.Encode(String.Format("{0:g}", newsletter.DateCreated)) %>
            </td>
            <td>
                <%= Html.ActionLink(Html.Encode(newsletter.Subject), "Show", new { id= newsletter.ID })%>
            </td>
        </tr>    
        <%} %>
    </table>
    

</asp:Content>
